//1、引入文件
import Vue from 'vue';
import Vuex from 'vuex';
import home from './modules/home';
import search from './modules/search';
import detail from './modules/detail';
import user from './modules/user';
import trade from './modules/trade';

//2、注册模块
Vue.use(Vuex);

//3、定义方法
const state = {};

const getters = {};
const actions = {}; //异步程序都是放在这里的
const mutations = {};

//4、创建实例和导出

export default new Vuex.Store({
  state,
  actions,
  getters,
  mutations,
  modules: { home, search, detail, user, trade }, //注册模块
});
